#include "TopologicalSort.h"
AGraph *setupAGraph1()
{
    char *names[] = {"0", "1", "2", "3", "4", "5", "6"};
    int n = sizeof(names) / sizeof(names[0]);

    AGraph* graph = createAGraph(n);
    initAGraph(graph, n, names, 1);
    addAGraphEdge(graph, 0, 1, 1);
    addAGraphEdge(graph, 0, 2, 1);
    addAGraphEdge(graph, 0, 3, 1);
    addAGraphEdge(graph, 1, 2, 1);
    addAGraphEdge(graph, 1, 4, 1);
    addAGraphEdge(graph, 2, 4, 1);
    addAGraphEdge(graph, 2, 5, 1);
    addAGraphEdge(graph, 3, 5, 1);
    addAGraphEdge(graph, 4, 6, 1);
    addAGraphEdge(graph, 5, 4, 1);
    addAGraphEdge(graph, 5, 6, 1);

    return graph;
}

int main()
{
    AGraph* graph = setupAGraph1();
    int result = TopologicalSortAGraph(graph);
    printf("\nresult: %d\n", result);
    releaseAGraph(graph);
    return 0;
}
